#pragma once
#include "TreeNode.h"


// CTSTreeView view

class CTSTreeView : public CTreeView
{
	DECLARE_DYNCREATE(CTSTreeView)

protected:
	CTSTreeView();           // protected constructor used by dynamic creation
	virtual ~CTSTreeView();

public:
	CTSGDoc* GetDocument() const;
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:	
	DECLARE_MESSAGE_MAP()
	virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
public:
	virtual void OnInitialUpdate();	
	void UpdateTree(CTreeNode* pNode);
	afx_msg void OnTvnSelchanged(NMHDR *pNMHDR, LRESULT *pResult);
};

#ifndef _DEBUG  // 
inline CTSGDoc* CTSTreeView::GetDocument() const
   { return reinterpret_cast<CTSGDoc*>(m_pDocument); }
#endif


